[ASP.NET] How can I HTML-encode a string and use human-readable encoded tags (ex: ê instead of

Posted by Beerdude26 on Stack Overflow See other posts from Stack Overflow or by Beerdude26
Published on 2010-04-14T14:45:26Z Indexed on 2010/04/15 8:43 UTC
Read the original article Hit count: 197

Greetings, I'm looking for a way to encode a string into HTML that uses human-readable tags such as ê (=ê). At the moment, I am using the HttpUtility.HtmlEncode() function, but it appears to return numbered tags instead of human-readable ones. For example:

Dim str as string = HttpUtility;HtmlEncode("vente - en-tête")
'Expected: vente - en-tête
'Actually received: vente - en-tête

Is there a setting or function in ASP.Net to encode a string into HTML resembling the first comment?

EDIT: I am looking for this kind of functionality because the text is saved HTML-encoded in the database. The text comes from a bunch of MS Word documents that have been converted to HTML.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about ASP.NET